import pymysql
class a3mall():
    def __init__(self,host,user,pwd,data):
        self.con=pymysql.connect(host=host,user=user,password=pwd,database=data)
        self.cur=self.con.cursor()
    def cx(self,sql):
        self.cur.execute(sql)
        return self.cur.fetchall()
    def tc(self):
        self.cur.close()
        self.con.close()